var lis = document.querySelectorAll(".i_box");
var img = document.querySelectorAll(".i_box img")
var opc = document.querySelector(".opc");


window.onscroll = function(){
    console.log(1);
    var scrollTop = document.body.scrollTop|| document.documentElement.scrollTop;
    var windowTop = window.innerHeight;
    var allHeight = scrollTop+windowTop;
    for(var i = 0; i<lis.length;i++){
        var listop = lis[i].offsetTop;
        if(listop<allHeight){
            img[i].src = lis[i].children[0].getAttribute("data-src");
            img[i].classList.add("opc");
            
        }
    }
    
}